<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>eRPC Generator (erpcgen): smart_ptr.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">eRPC Generator (erpcgen)
   &#160;<span id="projectnumber">Rev. 1.7.4</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('smart__ptr_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">smart_ptr.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2013-2014, Freescale Semiconductor, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright 2016 NXP</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#if !defined(_smart_ptr_h_)</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define _smart_ptr_h_</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="structsmart__ptr__delete.html">   16</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structsmart__ptr__delete.html">smart_ptr_delete</a></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;{</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> del(T *v) { <span class="keyword">delete</span> v; }</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;};</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="structsmart__ptr__free.html">   23</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structsmart__ptr__free.html">smart_ptr_free</a></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;{</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> del(T *v) { free(v); }</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;};</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="structsmart__ptr__delete__array.html">   30</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structsmart__ptr__delete__array.html">smart_ptr_delete_array</a></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;{</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> del(T *v) { <span class="keyword">delete</span>[] v; }</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;};</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">class</span> delete_policy = smart_ptr_delete&lt;T&gt; &gt;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classsmart__ptr.html">   41</a></span>&#160;<span class="keyword">class </span><a class="code" href="classsmart__ptr.html">smart_ptr</a></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;{</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keyword">typedef</span> T data_type;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keyword">typedef</span> T *ptr_type;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">const</span> T *const_ptr_type;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">typedef</span> T &amp;ref_type;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">const</span> T &amp;const_ref_type;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a1939a7eb7371eea65408e19d8ab7eeff">   51</a></span>&#160;    <a class="code" href="classsmart__ptr.html#a1939a7eb7371eea65408e19d8ab7eeff">smart_ptr</a>()</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    : _p(nullptr)</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    {</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    }</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#af25f2b85615b48af2f829d88c63e4075">   57</a></span>&#160;    <a class="code" href="classsmart__ptr.html#af25f2b85615b48af2f829d88c63e4075">smart_ptr</a>(ptr_type p)</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    : _p(p)</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    }</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a052ca22fe53c35b402cde1bea5bf0236">   63</a></span>&#160;    <a class="code" href="classsmart__ptr.html#a052ca22fe53c35b402cde1bea5bf0236">smart_ptr</a>(<a class="code" href="classsmart__ptr.html">smart_ptr&lt;T&gt;</a> &amp;&amp;other)</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    : _p(other._p)</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    {</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        other._p = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    }</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a50125e782b484e9d3965de2cfbe38ba2">   70</a></span>&#160;    <a class="code" href="classsmart__ptr.html">smart_ptr&lt;T&gt;</a> &amp;<a class="code" href="classsmart__ptr.html#a50125e782b484e9d3965de2cfbe38ba2">operator=</a>(<a class="code" href="classsmart__ptr.html">smart_ptr&lt;T&gt;</a> &amp;&amp;other)</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    {</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keyword">set</span>(other._p);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        other._p = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    }</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a7d31f37a089eebb2516e349a06696d79">   79</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classsmart__ptr.html#a7d31f37a089eebb2516e349a06696d79">~smart_ptr</a>() { safe_delete(); }</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#ae6d32c0876260a672fc0348baf8ed1b9">   82</a></span>&#160;    ptr_type <span class="keyword">get</span>() { <span class="keywordflow">return</span> _p; }</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#ad0c2a080cd6a6e5f4196fa847b93e28e">   85</a></span>&#160;    const_ptr_type <span class="keyword">get</span>() <span class="keyword">const</span> { <span class="keywordflow">return</span> _p; }</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a0caae3f1c3cf11d2a63435473b10891d">   91</a></span>&#160;    <span class="keywordtype">void</span> <span class="keyword">set</span>(ptr_type p)</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    {</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="keywordflow">if</span> (_p &amp;&amp; p != _p)</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        {</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            safe_delete();</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        }</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        _p = p;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#ac22e6f70fd19da74c9a89c4fb83e1997">  101</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classsmart__ptr.html#ac22e6f70fd19da74c9a89c4fb83e1997">reset</a>() { _p = <span class="keyword">nullptr</span>; }</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#af2807151c41c9d4901d41cf9a9c549a5">  104</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classsmart__ptr.html#af2807151c41c9d4901d41cf9a9c549a5">clear</a>() { safe_delete(); }</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a9c9bd9d75bb4557219cd616b06e3d0a4">  109</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsmart__ptr.html#a9c9bd9d75bb4557219cd616b06e3d0a4">safe_delete</a>()</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    {</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordflow">if</span> (_p)</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            delete_policy::del(_p);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;            _p = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        }</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    }</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#af5971f1c29161330f75e850b0ae217ca">  122</a></span>&#160;    <span class="keyword">operator</span> ptr_type() { <span class="keywordflow">return</span> _p; }</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a7f326a731cdfd9a84a880c846ad9a054">  125</a></span>&#160;    <span class="keyword">operator</span> const_ptr_type()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _p; }</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a80f82227c8333fa9b3831bc359751d3f">  128</a></span>&#160;    <span class="keyword">operator</span> ref_type() { <span class="keywordflow">return</span> *_p; }</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a3226dfaa179ce3499a4b794a0ce1fddf">  131</a></span>&#160;    <span class="keyword">operator</span> const_ref_type()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *_p; }</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a0b0290ca9165026a0e1563d1f8be7237">  134</a></span>&#160;    <span class="keyword">operator</span> bool()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _p != <span class="keyword">nullptr</span>; }</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a12fdbc182eebb7ce6e1a1a1520525a2e">  137</a></span>&#160;    <a class="code" href="classsmart__ptr.html">smart_ptr&lt;T&gt;</a> &amp;<a class="code" href="classsmart__ptr.html#a12fdbc182eebb7ce6e1a1a1520525a2e">operator=</a>(ptr_type p)</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    {</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keyword">set</span>(p);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    }</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#ae1aec2e35f454774cc148ce2c0b6dd89">  144</a></span>&#160;    ptr_type <a class="code" href="classsmart__ptr.html#ae1aec2e35f454774cc148ce2c0b6dd89">operator-&gt;</a>() { <span class="keywordflow">return</span> _p; }</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#a133c9877c1e23183b84cd3c64eb029a5">  147</a></span>&#160;    const_ptr_type <a class="code" href="classsmart__ptr.html#a133c9877c1e23183b84cd3c64eb029a5">operator-&gt;</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _p; }</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classsmart__ptr.html#aea22fa343d02cccef154a4c584388457">  151</a></span>&#160;    ptr_type <a class="code" href="classsmart__ptr.html#aea22fa343d02cccef154a4c584388457">_p</a>; </div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <a class="code" href="classsmart__ptr.html">smart_ptr</a>(<span class="keyword">const</span> <a class="code" href="classsmart__ptr.html">smart_ptr&lt;T&gt;</a> &amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <a class="code" href="classsmart__ptr.html">smart_ptr&lt;T&gt;</a> &amp;operator=(<span class="keyword">const</span> <a class="code" href="classsmart__ptr.html">smart_ptr&lt;T&gt;</a> &amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;};</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="keyword">using</span> <a class="code" href="classsmart__ptr.html">smart_array_ptr</a> = <a class="code" href="classsmart__ptr.html">smart_ptr&lt;T, smart_ptr_delete_array&lt;T&gt;</a> &gt;;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="keyword">using</span> <a class="code" href="classsmart__ptr.html">smart_free_ptr</a> = <a class="code" href="classsmart__ptr.html">smart_ptr&lt;T, smart_ptr_free&lt;T&gt;</a> &gt;;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="preprocessor">#endif // _smart_ptr_h_</span></div><div class="ttc" id="classsmart__ptr_html_a133c9877c1e23183b84cd3c64eb029a5"><div class="ttname"><a href="classsmart__ptr.html#a133c9877c1e23183b84cd3c64eb029a5">smart_ptr::operator-&gt;</a></div><div class="ttdeci">const_ptr_type operator-&gt;() const </div><div class="ttdoc">Another operator to allow you to treat the object just like a pointer. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:147</div></div>
<div class="ttc" id="classsmart__ptr_html_a052ca22fe53c35b402cde1bea5bf0236"><div class="ttname"><a href="classsmart__ptr.html#a052ca22fe53c35b402cde1bea5bf0236">smart_ptr::smart_ptr</a></div><div class="ttdeci">smart_ptr(smart_ptr&lt; T &gt; &amp;&amp;other)</div><div class="ttdoc">Move copy constructor. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:63</div></div>
<div class="ttc" id="classsmart__ptr_html_af2807151c41c9d4901d41cf9a9c549a5"><div class="ttname"><a href="classsmart__ptr.html#af2807151c41c9d4901d41cf9a9c549a5">smart_ptr::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">Dissociates a previously set pointer value, deleting it at the same time. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:104</div></div>
<div class="ttc" id="structsmart__ptr__free_html"><div class="ttname"><a href="structsmart__ptr__free.html">smart_ptr_free</a></div><div class="ttdoc">Delete policy using free() to delete objects. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:23</div></div>
<div class="ttc" id="classsmart__ptr_html_ae1aec2e35f454774cc148ce2c0b6dd89"><div class="ttname"><a href="classsmart__ptr.html#ae1aec2e35f454774cc148ce2c0b6dd89">smart_ptr::operator-&gt;</a></div><div class="ttdeci">ptr_type operator-&gt;()</div><div class="ttdoc">Another operator to allow you to treat the object just like a pointer. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:144</div></div>
<div class="ttc" id="classsmart__ptr_html_aea22fa343d02cccef154a4c584388457"><div class="ttname"><a href="classsmart__ptr.html#aea22fa343d02cccef154a4c584388457">smart_ptr::_p</a></div><div class="ttdeci">ptr_type _p</div><div class="ttdoc">The wrapped pointer. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:151</div></div>
<div class="ttc" id="classsmart__ptr_html_a1939a7eb7371eea65408e19d8ab7eeff"><div class="ttname"><a href="classsmart__ptr.html#a1939a7eb7371eea65408e19d8ab7eeff">smart_ptr::smart_ptr</a></div><div class="ttdeci">smart_ptr()</div><div class="ttdoc">Default constructor. Initializes with no pointer set. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:51</div></div>
<div class="ttc" id="structsmart__ptr__delete__array_html"><div class="ttname"><a href="structsmart__ptr__delete__array.html">smart_ptr_delete_array</a></div><div class="ttdoc">Delete policy for arrays. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:30</div></div>
<div class="ttc" id="classsmart__ptr_html"><div class="ttname"><a href="classsmart__ptr.html">smart_ptr</a></div><div class="ttdoc">Simple, standard smart pointer class. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:41</div></div>
<div class="ttc" id="classsmart__ptr_html_a12fdbc182eebb7ce6e1a1a1520525a2e"><div class="ttname"><a href="classsmart__ptr.html#a12fdbc182eebb7ce6e1a1a1520525a2e">smart_ptr::operator=</a></div><div class="ttdeci">smart_ptr&lt; T &gt; &amp; operator=(ptr_type p)</div><div class="ttdoc">To allow setting the pointer directly. Equivalent to a call to set(). </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:137</div></div>
<div class="ttc" id="classsmart__ptr_html_a7d31f37a089eebb2516e349a06696d79"><div class="ttname"><a href="classsmart__ptr.html#a7d31f37a089eebb2516e349a06696d79">smart_ptr::~smart_ptr</a></div><div class="ttdeci">virtual ~smart_ptr()</div><div class="ttdef"><b>Definition:</b> smart_ptr.h:79</div></div>
<div class="ttc" id="classsmart__ptr_html_a50125e782b484e9d3965de2cfbe38ba2"><div class="ttname"><a href="classsmart__ptr.html#a50125e782b484e9d3965de2cfbe38ba2">smart_ptr::operator=</a></div><div class="ttdeci">smart_ptr&lt; T &gt; &amp; operator=(smart_ptr&lt; T &gt; &amp;&amp;other)</div><div class="ttdoc">Move assignment operator. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:70</div></div>
<div class="ttc" id="structsmart__ptr__delete_html"><div class="ttname"><a href="structsmart__ptr__delete.html">smart_ptr_delete</a></div><div class="ttdoc">Delete policy for regular objects. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:16</div></div>
<div class="ttc" id="classsmart__ptr_html_ac22e6f70fd19da74c9a89c4fb83e1997"><div class="ttname"><a href="classsmart__ptr.html#ac22e6f70fd19da74c9a89c4fb83e1997">smart_ptr::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">Dissociates any previously set pointer value without deleting it. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:101</div></div>
<div class="ttc" id="classsmart__ptr_html_af25f2b85615b48af2f829d88c63e4075"><div class="ttname"><a href="classsmart__ptr.html#af25f2b85615b48af2f829d88c63e4075">smart_ptr::smart_ptr</a></div><div class="ttdeci">smart_ptr(ptr_type p)</div><div class="ttdoc">This constructor takes a pointer to the object to be deleted. </div><div class="ttdef"><b>Definition:</b> smart_ptr.h:57</div></div>
<div class="ttc" id="classsmart__ptr_html_a9c9bd9d75bb4557219cd616b06e3d0a4"><div class="ttname"><a href="classsmart__ptr.html#a9c9bd9d75bb4557219cd616b06e3d0a4">smart_ptr::safe_delete</a></div><div class="ttdeci">virtual void safe_delete()</div><div class="ttdef"><b>Definition:</b> smart_ptr.h:109</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">Copyright 2016-2020 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
